Trying to get this if statement to work but I can't seem to compare on variable to another that is i